-
-
Notifications
You must be signed in to change notification settings - Fork 608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update HikariCP and other dependencies #1821
Conversation
c.getBooleanOpt("autoCommit").foreach(hconf.setAutoCommit) | ||
|
||
val numThreads = c.getIntOr("numThreads", 20) | ||
|
||
hconf.setConnectionTimeout(c.getMillisecondsOr("connectionTimeout", 1000)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is one of the places where Slick is not using HikariCP defaults. While Slick uses 1 second, Hikari defaults to 30 seconds.
Should Slick respect HikariCP default?
.map("TRANSACTION_" + _) | ||
.foreach(hconf.setTransactionIsolation) | ||
|
||
hconf.setValidationTimeout(c.getMillisecondsOr("validationTimeout", 1000)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is another place where Slick is not using HikariCP defaults (5 seconds).
// `initializationFailTimeout`. See HikariCP docs for more information: | ||
// https://github.com/brettwooldridge/HikariCP#infrequently-used | ||
// But we still respect the value if it configured. | ||
c.getBooleanOpt("initializationFailFast").foreach(hconf.setInitializationFailFast) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Effectively avoids the log warning. Also, initializationFailTimeout
overrides it if both are present.
* database is still alive. It is database dependent and should be a query that takes very | ||
* little processing by the database (e.g. "VALUES 1"). When not set, the JDBC4 | ||
* `Connection.isValid()` method is used instead (which is usually preferable).</li> | ||
* <li>Essentials: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes the docs organization and add docs to the HikariCP configurations added. But most of the content is untouched.
@marcospereira unfortunately, this now conflicts with |
Most relevant changes: 1. initializationFailFast is now handled as an optional configuration. If it is not present, then no warning is printed. 2. Some keys such as `url`, `user` and `driver` now supports the HikariCP names like `jdbcUrl`, `username` and `driverClassName`. 3. Change documentation to separate required, frenquently used and infrenquetly used configurations.
It is the current default behavior with `initializationFailFast` so `initializationFailTimeout` needs to be configured to -1 by default to keep the existing behavior.
This PR includes updates for the following dependencies: